﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DSVISUAL.LocalDNS
{
    public static class EnumExtension
    {
        public static Dictionary<string, int> ToDictionary<T>()
        {
            var dic = new Dictionary<string, int>();
            foreach (var item in Enum.GetValues(typeof(T)))
            {
                dic.Add(item.ToString(), (int)item);
            }
            return dic;
        }
    }
}
